/*
 * Copyright@2009 qcj All rights reserved.
 */
package org.firegrid.model;

import java.util.Set;

import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * @author qcj,(jentrees2001@yahoo.com.cn)
 */
@Entity
@Table(name = "f_form_view")
public class FormView extends IdEntity {

	/**
	 * 
	 */
	private static final long serialVersionUID = -8712281594079846806L;

	private Form from;
	private String title;
	private Set<ViewGroup> groups;

	/**
	 * @return the from
	 */
	public Form getFrom() {
		return from;
	}

	/**
	 * @param from
	 *            the from to set
	 */
	public void setFrom(Form from) {
		this.from = from;
	}

	/**
	 * @return the title
	 */
	public String getTitle() {
		return title;
	}

	/**
	 * @param title
	 *            the title to set
	 */
	public void setTitle(String title) {
		this.title = title;
	}

	/**
	 * @return the groups
	 */
	@ManyToOne
	@JoinColumn(name = "view_id")
	public Set<ViewGroup> getGroups() {
		return groups;
	}

	/**
	 * @param groups
	 *            the groups to set
	 */
	public void setGroups(Set<ViewGroup> groups) {
		this.groups = groups;
	}

}
